<?php


/**
 * Notes:
 * PROJECT_NAME : ERP v1.8 重构erp
 * User: 夏鱼儿<397072174@qq.com>
 * Date: 2024/3/14
 * Time: 16:20
 */

namespace app\api\validate;

use think\Validate;

class OrderValidate extends Validate
{
    protected $rule = [
        'page'     => 'require',
        "limit"    => "require",
        'id'       => 'require|number',
        "cart_ids" => "require",
    ];

    protected $message = [
        'page.require'     => '页码不能为空',
        'limit.require'    => '每页条数不能为空',
        'id.require'       => 'id不能为空',
        'id.number'        => 'id必须为数字',
        "cart_ids.require" => '购物车id不能为空',
    ];

    protected $scene = [
        'list' => ['page', 'limit'],
        'add'  => ['cart_ids'],
        'detail'  => ['id'],
    ];
}